import java.util.Arrays;
import java.util.Scanner;

public class GeneralEmployee {
    int num;//编号
    String name;//姓名
    String sex;//性别
    int age;//年龄
    static String professionaltitle;//职称
    String educationbackground;//学历
    String department;//所在部门
    String ispartymember;//是否党员

    static int jobgrade;      //岗位等级，为了等下计算岗位工资


    public GeneralEmployee() {           //构造方法
    }//无参

    public GeneralEmployee(int num, String name, String sex, int age, String professionaltitle,int jobgrade) {//有参
        this.num = num;
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.professionaltitle = professionaltitle;
        this.jobgrade=jobgrade;//加入岗位等级元素，方便等下计算实际发工资

        // this.educationbackground = educationbackground;
        //this.department = department;
       // this.ispartymember = ispartymember;
    }
    //存储工资面额
    //int basicSalary//基本工资
    //int jobwage;//岗位工资
    //******************************************************************
    //获取基本工资
    public static int basicSalary(){
        if(Arrays.equals(professionaltitle.toCharArray(), "初级".toCharArray())){
            return 3000;
        }
        if(professionaltitle.equals("中级")){
            return 4000;
        }
        if(professionaltitle.equals("高级")){
            return 4000;
        }
        else {
            return 0;
        }
    }
       //获取岗位工资
    public static int jobwage(){
         int jobwage=0;      //存储岗位工资
        switch (jobgrade){
            case 1:
                jobwage=2000;
                break;
            case 2:
                jobwage=1800;
                break;
            case 3:
                jobwage=1500;
                break;
            case 4:
                jobwage=1200;
                break;
            case 5:
                jobwage=1000;
        }
        return jobwage;
    }
          //实发工资
    public static int Actual_salary(){
        return basicSalary()+jobwage();//基本工资+岗位工资
    }
    //显示工资信息
    public static void show(){
        System.out.println("实发工资="+Actual_salary() +"=" +basicSalary()+"("+"职称:" +professionaltitle+")"+"+"+jobwage()+"(" +"岗位等级:" +jobgrade+")");
    }




    //获取和设置成员变量
    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getProfessionaltitle() {
        return professionaltitle;
    }

    public void setProfessionaltitle(String professionaltitle) {
        this.professionaltitle = professionaltitle;
    }

    public String getEducationbackground() {
        return educationbackground;
    }

    public void setEducationbackground(String educationbackground) {
        this.educationbackground = educationbackground;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getIspartymember() {
        return ispartymember;
    }

    public void setIspartymember(String ispartymember) {
        this.ispartymember = ispartymember;
    }
}
